<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>AJAX</title>
</head>
<body>
    <p>
        <input type="button" value="发送请求" onclick="submit()">
    </p>
    <script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
    <script>
        function submit() {
            $.post(
                "/community/Alpha/ajax",
                {"name":"樊旭", "age":44},
                function(data){
                    console.log(data);
                    console.log(typeof(data));
                    data =$.parseJSON(data);
                    console.log(typeof(data));
                    console.log(data.code);
                }

            )
        }
    </script>
</body>
</html>